import request from "@/utils/request";
import { SearchResultResponse, SuggestionResponse } from '@/types/data'
type Params = {
  q: string
}
export function SearchAPI(params: Params): Promise<SuggestionResponse> {
  return request.get('/suggestion', {
    params
  })
}
type Paramss = {
  page: number
  per_page: number
  q: string
}
export function searchResponse(params: Paramss): Promise<SearchResultResponse> {
  return request.get('/search', {
    params
  })
}